import base from '@/api/baseurl';
import request from '@/utils/request'

/**
 * 查询币种
 * @param {*} query
 * @returns
 */
export function fetchListcurrency(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/currency/findcurrency',
    method: 'get',
    params: query
  })
}

/**
 * 查询法人下拉框
 * @param {*} query
 * @returns
 */
export function fetchListuserlp(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/currency/findcurrencyuserlp',
    method: 'get',
    params: query
  })
}

/**
 * 单行删除
 * @param {*} query
 * @returns
 */
export function deleteCurrency(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/currency/deletecurrency',
    method: 'get',
    params: query
  })
}

/**
 * 增加新币种
 * @param {*} data
 * @returns
 */
export function addCurrency(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/currency/addcurrency',
    method: 'post',
    data
  })
}

/**
 * 修改币种
 * @param {*} data
 * @returns
 */
export function updateCurrency(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/currency/updatecurrency',
    method: 'post',
    data
  })
}

/**
 * 多选删除
 * @param {*} data
 * @returns
 */
export function batchDeleteCurrency(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/currency/batchdeletecurrency',
    method: 'post',
    data
  })
}
